package com.hust.ele.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * @description 实体化类user  -> t_user
 * @author 周杨
 * @Time 2018年10月25日 下午12:58:37
 */
@Entity
@Table(name = "t_user")
//@GenericGenerator(name = "jpa-uuid", strategy = "uuid")
public class User {
	@Id
	@GenericGenerator(name="idGenerator", strategy="uuid") //这个是hibernate的注解/生成32位UUID
    @GeneratedValue(generator="idGenerator")
	private String userId; //主键
	
	@Column
	private String userName; //登录名
	@Column()
	private String loginName ;//昵称 用户名
	@Column
	private String password;//登录密码
	@Column
	private String phoneNumber;//手机号
	@Column
	private String idNumber;//身份证号
	@Column
	private String email;//邮箱名
	@Column
	private Integer memberLevel;//会员等级
	@Column
	private Date createTime;//注册时间
	@Column
	private Integer status;//账号状态 1激活 2异常限制登录 3无效
	@Column
	private Date changeTime;//上次修改时间
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getIdNumber() {
		return idNumber;
	}
	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Integer getMemberLevel() {
		return memberLevel;
	}
	public void setMemberLevel(Integer memberLevel) {
		this.memberLevel = memberLevel;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Date getChangeTime() {
		return changeTime;
	}
	public void setChangeTime(Date changeTime) {
		this.changeTime = changeTime;
	}
	@Override
	public String toString() {
		return "User [userId=" + userId + ", userName=" + userName
				+ ", loginName=" + loginName + ", password=" + password
				+ ", phoneNumber=" + phoneNumber + ", idNumber=" + idNumber
				+ ", email=" + email + ", memberLevel=" + memberLevel
				+ ", createTime=" + createTime + ", status=" + status
				+ ", changeTime=" + changeTime + "]";
	}
	
}
